package org.u2ml.stack.web.spring;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.web.context.support.XmlWebApplicationContext;

public class XWebApplicationContext extends XmlWebApplicationContext {
	protected void loadBeanDefinitions(XmlBeanDefinitionReader reader) throws BeansException, IOException {
		List<Resource> configs = Arrays.asList((Resource) new ClassPathResource("/applicationContext.xml"));
		reader.loadBeanDefinitions((Resource[]) configs.toArray(new Resource[configs.size()]));
	}	
}